#define _CRT_SECURE_NO_WARNINGS 1

#include <math.h>
#include <stdio.h>

#define LEN 10

void Print_arr(double* arr, int n)
{
	for (int i = 0; i < n; i++)
	{
		printf("%.2f   ", arr[i]);
	}
	printf("\n");
}

void transform(double* sorc, double* target, int n, double(*pf)(double))
{
	for (int i = 0; i < n; i++)
	{
		target[i] = pf(sorc[i]);
	}
}


int main()
{
	double arr1[LEN] = { 0 };
	double arr2[LEN] = { 0 };
	for (int i = 0; i < LEN; i++)
	{
		arr2[i] = i/2.0;
	}
	Print_arr(arr2, LEN);
	transform(arr2, arr1, LEN, sin);
	Print_arr(arr1,LEN);
	transform(arr2, arr1, LEN, cos);
	Print_arr(arr1, LEN);
	transform(arr2, arr1, LEN, tan);
	Print_arr(arr1, LEN);
	return 0;
}